#pragma once

namespace _hHuffmanDetail
{
	struct Node
	{
		size_t _freq = 0;
		Node* _left = NULL;
		Node* _right = NULL;

		virtual ~Node() {}
		virtual std::ostream& fillOs(std::ostream& os) const;
		size_t calcHeight() const;
		const Node* getNodeByHeight(size_t height, size_t idx) const;

	};
	 
	struct CharNode : public Node
	{
		char _ch = 0;

		std::ostream& fillOs(std::ostream& os) const;
	};
}
